parent

abstract fun parent(): Optional<Node>

Returns an Optional that contains the parent of this node. If there is no such node, for example when this node is the document or it does not belong to the DOM tree, returns an empty Optional.

Throws

when this node is closed